package palette;

import javax.swing.JTextArea;
import cuShapes.PQShape;

@SuppressWarnings("serial")
public class PropertiesSidebar extends JTextArea{
	
	PQShape m_shape;
	
	public PropertiesSidebar () {
		super("  Shape Properties             ");
		setEditable(false);
		append("\n\n");
		append("Name:\n");
		append("\n");
		append("Width:\n");
		append("Height:\n");
	}
	
	public void setShape(PQShape shape) {
		m_shape = shape;
		displayShape();
	}
	
	private void displayShape() {
		setText("  Shape Properties             ");
		append("\n\n");
		append("Name:  " + m_shape.getName() + "\n");
		append("\n");
		append("Width:  " + m_shape.getWidth() + "\n");
		append("Height:  " + m_shape. getHeight() + "\n");
	}
}
